Skip to content

Conversation

ppkarwasz
Copy link
Contributor

Adds a reusable GitHub Actions workflow (process-dependabot-reusable) to streamline handling of Dependabot PRs across repositories.

  • Generates changelog entries for each updated dependency, ensuring consistent documentation of version bumps.
  • Enables auto-merge to merge the PR once it has been reviewed and all required checks pass, reducing manual overhead for routine updates.

This workflow helps enforce update standards while automating repetitive tasks, supporting smoother and more consistent dependency management.

Adds a reusable GitHub Actions workflow (`process-dependabot-reusable`) to streamline handling of Dependabot PRs across repositories.

* **Generates changelog entries** for each updated dependency, ensuring consistent documentation of version bumps.
* **Enables auto-merge** to merge the PR once it has been reviewed and all required checks pass, reducing manual overhead for routine updates.

This workflow helps enforce update standards while automating repetitive tasks, supporting smoother and more consistent dependency management.
@ppkarwasz ppkarwasz requested review from Copilot and vy June 16, 2025 16:13
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a reusable GitHub Actions workflow to automate Dependabot PR processing, including changelog generation and auto-merging.

  • Adds a changelog template entry for the new workflow
  • Updates the Maven build config to ignore node_modules
  • Creates .github/workflows/process-dependabot-reusable.yaml and removes the old merge workflow
  • Implements a custom generate-dependabot-changelog action with its supporting code and tests

Reviewed Changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/changelog/.12.x.x/add-deploy-profile.xml Adds a changelog entry for the new deploy profile
pom.xml Excludes node_modules from license checks
.github/workflows/process-dependabot-reusable.yaml Defines the reusable Dependabot workflow
.github/workflows/merge-dependabot.yaml Removes the old merge-dependabot workflow
.github/actions/generate-dependabot-changelog/tsconfig.json TypeScript config for the custom action
.github/actions/generate-dependabot-changelog/src/pull_request.ts Fetches associated PR for a commit
.github/actions/generate-dependabot-changelog/src/pull_request.test.ts Tests for getAssociatedPullRequest
.github/actions/generate-dependabot-changelog/src/maven.ts Parses project version from pom.xml
.github/actions/generate-dependabot-changelog/src/maven.test.ts Tests for version parsing
.github/actions/generate-dependabot-changelog/src/main.ts Main action logic (generate entries)
.github/actions/generate-dependabot-changelog/src/main.test.ts Tests for the main action
.github/actions/generate-dependabot-changelog/src/dependabot.ts Extracts dependency metadata from commit message
.github/actions/generate-dependabot-changelog/src/dependabot.test.ts Tests for metadata extraction
.github/actions/generate-dependabot-changelog/src/changelog.ts Builds XML changelog entries
.github/actions/generate-dependabot-changelog/src/changelog.test.ts Tests for XML generation
.github/actions/generate-dependabot-changelog/package.json Declares dependencies and scripts
.github/actions/generate-dependabot-changelog/jest.config.js Jest configuration for the action
.github/actions/generate-dependabot-changelog/eslint.config.mjs ESLint configuration
.github/actions/generate-dependabot-changelog/action.yml Action metadata (inputs/outputs)
.github/actions/generate-dependabot-changelog/README.md Documentation for the custom action
Comments suppressed due to low confidence (2)

src/changelog/.12.x.x/add-deploy-profile.xml:8

  • The description references process-dependabot-workflow but the new workflow is named process-dependabot-reusable. Update the name to match the actual workflow.
Added `process-dependabot-workflow` to handle Dependabot PRs under RTC restrictions.

.github/workflows/process-dependabot-reusable.yaml:118

  • The auto-merge step defines AUTO_MERGE_TOKEN as an input but uses GH_TOKEN: ${{ github.token }}. It should use the provided AUTO_MERGE_TOKEN (secrets.AUTO_MERGE_TOKEN) to ensure the correct token is applied.
env:

@ppkarwasz ppkarwasz linked an issue Jun 20, 2025 that may be closed by this pull request
ppkarwasz added a commit that referenced this pull request Jun 22, 2025
…ive)

This PR introduces a **reusable GitHub Actions workflow**, `process-dependabot-reusable`, designed to streamline the handling of Dependabot pull requests across repositories — implemented entirely with **shell scripts**.

This serves as a Bash-based alternative to #418, which uses TypeScript.

### 🔄 Key Differences from #418

* **Trigger**: Runs on `pull_request_target` (not `push`), which is required by the `dependabot/fetch-metadata` action.
* **Implementation**: Written using **standard POSIX tools** with a few dependencies:

  * **`bash`** – some Bash-specific constructs are used
  * **`jq`** – for processing JSON output from `dependabot/fetch-metadata`
  * **`xmlstarlet`** – for parsing `pom.xml` and generating a changelog XML file
  * **`git`** – to commit and push any changes
  * **`gh`** – to enable "auto-merge" on the pull request

This approach avoids the Node.js/TypeScript toolchain and relies only on standard CLI tools commonly available in CI environments.
@ppkarwasz
Copy link
Contributor Author

Now that I am fully satisfied by #419, we can close this PR.

@ppkarwasz ppkarwasz closed this Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapt merge-dependabot-reusable to support RTC workflow

1 participant